<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath(); %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>管理端</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="icon" href="<%=path%>/images/favicon.ico" sizes="32x32" />
    <link rel="stylesheet" href="<%=path%>/css/font.css">
    <link rel="stylesheet" href="<%=path%>/css/xadmin.css">
    <script type="text/javascript" src="<%=path%>/js/jquery-1.3.2.min.js"></script>
    <script src="<%=path%>/lib/layui/layui.js"></script>
    <script type="text/javascript" src="<%=path%>/js/xadmin.js"></script>
    <script src="<%=path%>/layui_exts/excel.js"></script>
</head>
<body>
<div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card" style="margin-top: 15px;">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">
                                <i class="layui-icon">&#xe667;</i>
                                <c:forEach items="${sw_notices}" var="notice">
                                    <tr style="background: #f8f8f8;border: 0;">
                                        <c:if test="${notice.content.length()>=35}">
                                            <th>${notice.content.substring(0,35)}...</th>
                                        </c:if>
                                        <c:if test="${notice.content.length()<35}">
                                            <th>${notice.content}</th>
                                        </c:if>
                                    </tr>
                                </c:forEach>
                                欢迎进入失物招领系统
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">积分榜</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <thead>
                                <tr>
                                    <th>证号</th>
                                    <th>姓名</th>
                                    <th>积分</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach items="${scores}" var="score" varStatus="s">
                                    <c:if test="${s.count != 1}">
                                        <tr style="background: #f8f8f8;border: 0;">
                                            <th>${score.ucard}</th>
                                            <th>${score.uname}</th>
                                            <th>${score.num}</th>
                                        </tr>
                                    </c:if>
                                    <c:if test="${s.count == 1}">
                                        <tr style="background: #d3d3d3;border: 0;">
                                            <th>${score.ucard}</th>
                                            <th>${score.uname}</th>
                                            <th>${score.num}</th>
                                        </tr>
                                    </c:if>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-card-header">最新失物信息发布</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                <c:forEach items="${losses}" var="loss">
                                    <tr style="background: #f8f8f8;border: 0;">
                                        <c:if test="${loss.remark.length()>=35}">
                                            <th>${loss.remark.substring(0,35)}...</th>
                                        </c:if>
                                        <c:if test="${loss.remark.length()<35}">
                                            <th>${loss.remark}</th>
                                        </c:if>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-card-header">最新拾物信息发布</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                <c:forEach items="${obtains}" var="obtain">
                                    <tr style="background: #f8f8f8;border: 0;">
                                        <c:if test="${obtain.remark.length()>=35}">
                                            <th>${obtain.remark.substring(0,35)}...</th>
                                        </c:if>
                                        <c:if test="${obtain.remark.length()<35}">
                                            <th>${obtain.remark}</th>
                                        </c:if>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
</body>
</html>
